/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'
import RangeLineView from '@/views/five/index.vue'
import { generateRangeRoutes } from '@/utils/study.js'

const CATE_VALUE_STRING = 'Five'
const CATE_VALUE_PREFIX = `${CATE_VALUE_STRING.toUpperCase()}_`

const rangeList = generateRangeRoutes(CATE_VALUE_PREFIX, CATE_VALUE_STRING, RangeLineView, true)

const chartsRouter = {
  path: '/five',
  component: Layout,
  redirect: 'noRedirect',
  name: 'Cate' + CATE_VALUE_STRING,
  meta: {
    title: '÷10 five',
    icon: 'line-chart'
  },
  children: [
    {
      path: 'ascending',
      component: () => import('@/views/five/ascending/ascending'),
      name: CATE_VALUE_STRING + 'Ascending',
      meta: {
        title: 'ascending',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'ASCENDING_GROUPS'
      }
    },
    {
      path: 'mantissa',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Mantissa',
      meta: {
        title: 'mantissa',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'MANTISSA_GROUPS'
      }
    },
    {
      path: 'prime',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Prime',
      meta: {
        title: 'prime',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'PRIME_GROUPS'
      }
    },
    {
      path: 'fibonacci',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Fibonacci',
      meta: {
        title: 'fibonacci',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'FIBONACCI_GROUPS'
      }
    },
    {
      path: 'difference',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Difference',
      meta: {
        title: 'difference',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'DIFFERENCE_GROUPS'
      }
    },
    {
      path: 'modulo-three',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'ModuloThree',
      meta: {
        title: 'modulo three',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'MODULO_THREE_GROUPS'
      }
    },
    {
      path: 'center-expansion',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'CenterExpansion',
      meta: {
        title: 'center expansion',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'CENTER_EXPANSION_GROUPS'
      }
    },
    {
      path: 'large-mid-small',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'LargeMidSmall',
      meta: {
        title: 'large mid small',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'LARGE_MID_SMALL_GROUPS'
      }
    },
    {
      path: 'quadrant',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Quadrant',
      meta: {
        title: 'quadrant',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'QUADRANT_GROUPS'
      }
    },

    // {
    //   path: 'crossing',
    //   component: RangeLineView,
    //   name: 'Five'+'Crossing',
    //   meta: {
    //     title: 'crossing',
    //     noCache: true,
    //     groupsKey: 'FIVE_CROSSING_GROUPS'
    //   }
    // },

    {
      path: 'pyramid',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Pyramid',
      meta: {
        title: 'pyramid',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'PYRAMID_GROUPS'
      }
    },
    {
      path: 'fold-back',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'Foldback',
      meta: {
        title: 'fold back',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'FOLD_BACK_GROUPS'
      }
    },
    // {
    //   path: 'odd-even',
    //   component: RangeLineView,
    //   name: 'Five'+'OddEven',
    //   meta: {
    //     title: 'odd even',
    //     noCache: true,
    //     groupsKey: 'FIVE_ODD_EVEN_GROUPS'
    //   }
    // },

    {
      path: 'jump-two',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'JumpTwo',
      meta: {
        title: 'jump two',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'JUMP_TWO_GROUPS'
      }
    },
    {
      path: 'jump-three',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'JumpThree',
      meta: {
        title: 'jump three',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'JUMP_THREE_GROUPS'
      }
    },
    {
      path: 'jump-four',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'JumpFour',
      meta: {
        title: 'jump four',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'JUMP_FOUR_GROUPS'
      }
    },
    {
      path: 'jump-five',
      component: RangeLineView,
      name: CATE_VALUE_STRING + 'JumpFive',
      meta: {
        title: 'jump five',
        noCache: true,
        groupsKey: CATE_VALUE_PREFIX + 'JUMP_FIVE_GROUPS'
      }
    },

    ...rangeList
  ]
}

export default chartsRouter
